function [ delta ] = hiddenDelta( h, layer, delta_old, activationDerivate, BETA  )
%OUTPUTDELTA Summary of this function goes here
%   Detailed explanation goes here


s = size(layer,2)-1;

w= (delta_old)*layer(:,1:s);

for i = 1: size(h,1)
    delta(i) = Gprima(h(i), activationDerivate, BETA ) * w(i);
end

